Skip to content

Conversation

@santisq
Copy link
Owner

@santisq santisq commented Apr 7, 2025

This PR modifies the Get-PSTreeRegistry cmdlet to include registry default values (unnamed values displayed as (Default) in regedit), which were previously excluded due to a filter on empty value names.

Impact of the Change

Before: (Default) values (empty-named registry values) were excluded from the output:

PS ..\PSTree> Get-PSTreeRegistry Registry::HKEY_CLASSES_ROOT\LibreOffice.Pdf\shell\new

Kind         Hierarchy
----         ---------
RegistryKey  new
RegistryKey  └── command

After: (Default) values are now included:

PS ..\PSTree> Get-PSTreeRegistry Registry::HKEY_CLASSES_ROOT\LibreOffice.Pdf\shell\new

Kind         Hierarchy
----         ---------
RegistryKey  new
String       ├── (Default)
RegistryKey  └── command
String           └── (Default)

PS ..\PSTree> (Get-PSTreeRegistry Registry::HKEY_CLASSES_ROOT\LibreOffice.Pdf\shell\new)[-1].GetValue()
"C:\Program Files\LibreOffice\program\sdraw.exe" -n "%1"

@santisq santisq added the enhancement New feature or request label Apr 7, 2025
@santisq santisq requested a review from Copilot April 7, 2025 16:10
@santisq santisq self-assigned this Apr 7, 2025
@santisq santisq linked an issue Apr 7, 2025 that may be closed by this pull request
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

src/PSTree/TreeRegistryValue.cs:12

  • [nitpick] Consider adding a comment explaining the distinct roles of _valueName and Name; _valueName holds the original registry value for lookup, while Name is formatted for display.
private readonly string _valueName;

@codecov
Copy link

codecov bot commented Apr 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.01%. Comparing base (42bfd24) to head (51b8791).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #48      +/-   ##
==========================================
+ Coverage   95.93%   96.01%   +0.07%     
==========================================
  Files          25       25              
  Lines         862      879      +17     
  Branches      104      106       +2     
==========================================
+ Hits          827      844      +17     
  Misses         26       26              
  Partials        9        9              
Flag Coverage Δ
PS-5.1 95.46% <100.00%> (+0.09%) ⬆️
PS-7_Linux 71.86% <45.83%> (-0.27%) ⬇️
PS-7_Windows 95.98% <100.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@santisq santisq merged commit 490a9f7 into main Apr 7, 2025
7 checks passed
@santisq santisq deleted the 47-get-pstreeregistry-is-ignoring-default-registry-values branch April 7, 2025 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Get-PSTreeRegistry is ignoring (Default) registry values

2 participants